# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-googleapis-common-protos
_pkgname='googleapis-common-protos'
pkgver=1.70.0
_pyver=3.13
pkgrel=1
pkgdesc='Common protobufs used in Google APIs.'
arch=('any')
url='https://pypi.org/project/googleapis-common-protos/#files'
license=('Apache')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('02f5883a94ee59876d800b479e711f48367698f885cb3965f542af5f108f4858b7fd20b01c95a76c1cc792b7a3e883e68f8f0c04ef132da388c67576bce89ece')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build

  # fix permissions
  chmod 644 \
    "$pkgdir/usr/lib/python$_pyver/site-packages/googleapis_common_protos-1.70.0-py$_pyver.egg-info/"*
}

